﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Client
{
    public class OrderInfoProcess : QunYing.Common.IOrderInfoHandle
    {
        QunYing.BLL.OrderInfo bll_order = new QunYing.BLL.OrderInfo();
        #region IWarnInfoHandle 成员

        public void ProcessOrderInfo(int warnInfoKey)
        {
            if (warnInfoKey == -1) return;

            var vv = bll_order.GetModel(warnInfoKey);
            if (vv == null)
                return;
            Console.Beep(1000, 1000);
            ShowMessageInfo smi = new ShowMessageInfo();
            smi.messageDateTime = vv.订单日期.ToString();
            smi.messageType = "订单信息";
            smi.messageTitle =vv.订单编号;
            smi.messageValue = vv.收件人+"\r\n"+vv.收件地址;
            
            if (GlobalInfo.UserLoginInfo.角色 == "经销商")
            {
               // smi.action = () => { FormWarnOrderAdd fwo = new FormWarnOrderAdd(); fwo.BindData(vv); fwo.ShowDialog(); };
                GlobalInfo.MainForm.Invoke(new Action(() => MessageFormManager.ShowMessageForm(smi)));
            }
        }

        #endregion
    }
}
